<template>
  <nav @click="fn">{{ cityName }}</nav>
</template>

<script>
import { mapState } from "vuex";

export default {
  computed: mapState(["cityName"]),
  methods: {
    fn() {
      this.$router.push("/city");
    },
  },
};
</script>

<style lang="less" scoped>
nav {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
